home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / spore / spore.h < prev    next >
C/C++ Source or Header  |  1995-05-03  |  3KB  |  102 lines

  1.  
  2. /*************************************************************************
  3.  *                                                                       *
  4.  *  Copyright (c) 1992, 1993 Ronald Joe Record                           *
  5.  *                                                                       *
  6.  *  All rights reserved. No part of this program or publication may be   *
  7.  *  reproduced, transmitted, transcribed, stored in a retrieval system,  *
  8.  *  or translated into any language or computer language, in any form or *
  9.  *  by any means, electronic, mechanical, magnetic, optical, chemical,   *
  10.  *  biological, or otherwise, without the prior written permission of:   *
  11.  *                                                                       *
  12.  *      Ronald Joe Record (408) 458-3718                                 *
  13.  *      212 Owen St., Santa Cruz, California 95062 USA                   *
  14.  *                                                                       *
  15.  *************************************************************************/
  16.  
  17. /*
  18.  *    @(#) spore.h
  19.  */
  20. /*
  21.  *    Written by Ron Record (rr@sco.com) 07 Apr 1993.
  22.  */
  23.  
  24. #include "patchlevel.h"
  25. #include "libXrr.h"
  26. #include <math.h>
  27. #include <memory.h>
  28. #include <stdio.h>
  29. #include <stdlib.h>
  30. #include <string.h>
  31. #include <unistd.h>
  32. #include <values.h>
  33. #include <X11/Xlib.h> 
  34. #include <X11/StringDefs.h> 
  35. #include <X11/keysym.h> 
  36. #include <X11/cursorfont.h> 
  37. #include <X11/Xutil.h>
  38. #include <X11/Xatom.h>
  39.  
  40. #define ABS(a)    (((a)<0) ? (0-(a)) : (a) )
  41. #define Min(x,y) ((x < y)?x:y)
  42. #define Max(x,y) ((x > y)?x:y)
  43. #define MAX_ATTEMPTS 100
  44.  
  45. /* Useful mathematical constants that should have been defined in math.h 
  46.  * M_LOG2E    - log2(e)
  47.  * M_LN2        - ln(2)
  48.  * M_PI        - pi
  49.  */
  50. #ifndef M_LOG2E
  51. #define M_LOG2E    1.4426950408889634074
  52. #endif
  53. #ifndef M_PI
  54. #define M_PI    3.14159265358979323846
  55. #endif
  56. #ifndef M_LN2
  57. #define M_LN2      6.9314718055994530942E-1 /*Hex  2^-1 * 1.62E42FEFA39EF */
  58. #endif
  59.  
  60. /* Useful machine-dependent values that should have been defined in values.h
  61.  * LN_MAXDOUBLE    - the natural log of the largest double  -- log(MAXDOUBLE)
  62.  * LN_MINDOUBLE    - the natural log of the smallest double -- log(MINDOUBLE)
  63.  */
  64. #ifndef LN_MINDOUBLE
  65. #define LN_MINDOUBLE (M_LN2 * (DMINEXP - 1))
  66. #endif
  67. #ifndef LN_MAXDOUBLE
  68. #define LN_MAXDOUBLE (M_LN2 * DMAXEXP)
  69. #endif
  70.  
  71. #ifndef TRUE
  72. #define TRUE 1
  73. #define FALSE 0
  74. #endif
  75.  
  76. int STARTCOLOR=16;
  77. int INDEXINC=20;
  78. int mincolindex=41;
  79.  
  80. int screen;
  81. int numwheels = MAXWHEELS;
  82. Display*    dpy;
  83.  
  84. extern double fabs();
  85. extern long time();
  86. extern int optind;
  87. extern char *optarg;
  88.  
  89. Window canvas, help;
  90.  
  91. typedef struct {
  92.     int x, y;
  93. } xy_t;
  94.  
  95. points_t Points;
  96.  
  97. GC Data_GC[MAXCOLOR];
  98.  
  99. Pixmap  pixmap;
  100. XColor    Colors[MAXCOLOR];
  101. Colormap cmap;
  102.